import java.util.Scanner;

public class Test {


    public static void main14(String[] args) {
        //第十四题-螺旋矩阵
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] arr = new int[n][m];
        //给数组赋值，以螺旋的形式
        int i = 0;
        int j = 0;
        int val = 1;
      /*  //先赋值第一行
        for (i = 0; i < n; i++) {
            arr[j][i] =val++;
        }
        n--;
        //n = 5，m=5
        //i=5
        while() {

            //上-》下
            for() {
                arr[1-4][5] = val++;
            }
            //右-》左
            for() {
                arr[4][3-0] = val++;
            }
            //下-》上
            for() {
                arr[3-1][0] = val++;
            }
            //左-》右
            for() {
                arr[1][1-3] = val++;
            }
        }*/

    }
    public static void main13(String[] args) {
        //第十三题
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        int max = 0;
        if(arr[0]>arr[1]) {
           max = arr[0]-arr[1]+1;
        }else {
            max = arr[1]-arr[0]+1;
        }
        for (int i = 0; i < n-1; i++) {
            for (int j = i+1; j < n; j++) {
                int tmp = 0;
                if(arr[i]>arr[j]) {
                    tmp = arr[i]-arr[j]+j-i;
                }else {
                    tmp = arr[j]-arr[i]+j-i;
                }
                if(tmp>max) {
                    max = tmp;
                }
            }
        }
        System.out.println(max);
    }


    public static void main12(String[] args) {
        //第十二题
        StringBuilder stringBuilder = new StringBuilder();
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();

        for (int i = 0; i < str.length(); i++) {
            int ch = str.charAt(i);
            if(ch<'x') {
                char c = (char)(ch+3);
                stringBuilder.append(c);
            }else if(ch=='x'){
                stringBuilder.append('a');
            }else if(ch=='y'){
                stringBuilder.append('b');
            }else if(ch=='z'){
                stringBuilder.append('c');
            }
        }
        str = stringBuilder.toString();
        System.out.println(str);
    }

    public static void main11(String[] args) {
        //第十一题
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        for (int i = 1; i <= n; i++) {
            int flag = 1;
            int tmp = i;
            while(tmp>0) {
                if(tmp%10 != 2) {
                    tmp=tmp/10;
                }else {
                    flag = 0;
                    break;
                }
            }
            if(flag == 1) {
                count++;
            }
        }
        System.out.println(count);

    }
    public static void main10(String[] args) {
        //第十题
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[3];
        for (int i = 0; i < 3; i++) {
            arr[i] = scanner.nextInt();
        }
        int count = 0;
        while(n>0) {
            if(n%arr[0]!=0&&n%arr[1]!=0&&n%arr[2]!=0) {
                count++;
            }
            n--;
        }
        System.out.println(count);

    }
    public static void main4(String[] args) {
        //第四题



    }
    public static void main3(String[] args) {
        //第三题
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();
        int M = scanner.nextInt();
        int[][] arr = new int[M][2];
        for (int i = 0; i < M; i++) {
            for (int j = 0; j < 2; j++) {
                arr[i][j] = scanner.nextInt();
            }
        }
        int count = 0;
        for (int i = 0; i < M; i++) {
            if(arr[i][0] < T) {
                count+=arr[i][1];
            }
        }
        System.out.println(count);
    }
    public static void main2(String[] args) {
        //第二题
        Scanner scanner  = new Scanner(System.in);
        int a =scanner.nextInt();
        int b =scanner.nextInt();
        int t =scanner.nextInt();
        int count = 0;
        while(t>=60) {
            a++;
            t = t-60;
        }
        if(t+b>=60) {
            a++;
            b = b+t-60;
        }
        System.out.println(a);
        System.out.println(b);
    }

    public static void main1(String[] args) {
        //第一题
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        for (int i = 0; i < n-1; i++) {
            for (int j = 0; j < n-1-i; j++) {
                if(arr[j]>arr[j+1]) {
                    int tmp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = tmp;
                }
            }
        }
        int count = 0;//记录金币数量
        int i = 0;
        for (int j = 0; j < n-1; j++) {
            count += arr[j] + arr[j+1];
            arr[j+1] = arr[j] + arr[j+1];
        }
        System.out.println(count);
    }
}
